<template>
  <div class="q-pa-md row items-start q-gutter-md">
    <t-card class="my-card" flat bordered>
      <t-img src="https://cdn.quasar.dev/img/parallax2.jpg" />

      <t-card-section>
        <div class="text-overline text-orange-9">Overline</div>
        <div class="text-h5 q-mt-sm q-mb-xs">Title</div>
        <div class="text-caption text-grey">
          Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
          eiusmod tempor incididunt ut labore et dolore magna aliqua.
        </div>
      </t-card-section>

      <t-card-actions>
        <t-btn flat color="primary" label="Share" />
        <t-btn flat color="secondary" label="Book" />

        <t-space />

        <t-btn
          color="grey"
          round
          flat
          dense
          :icon="expanded ? 'keyboard_arrow_up' : 'keyboard_arrow_down'"
          @click="expanded = !expanded"
        />
      </t-card-actions>

      <t-slide-transition>
        <div v-show="expanded">
          <t-separator />
          <t-card-section class="text-subtitle2">
            {{ lorem }}
          </t-card-section>
        </div>
      </t-slide-transition>
    </t-card>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      return {
        expanded: ref(false),
        lorem:
          'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.',
      };
    },
  };
</script>

<style lang="sass" scoped>
  .my-card
    width: 100%
    max-width: 350px
</style>
